package homework.test02;

/*
 *
 *  测试类:
 *          分层思想:实体类的对象只负责对数据的存和取,操作类对数据进行操作,完成相应的业务
 *
 *
 * */
public class Test {
    public static void main(String[] args) {
        //1.创建对象,存储数据
        Student s1 = new Student();
        //利用get和set方法赋值
        s1.setName("张三");
        s1.setAge(23);

        Student s2 = new Student("李四", 24);

        //2.利用操作类对数据进行操作
        StudentOperator studentOperator = new StudentOperator(s1);
        studentOperator.show();

        StudentOperator studentOperator1 = new StudentOperator(s2);
        studentOperator1.show();

    }
}
